package com.intelligent.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;


@TableName(value = "receipt_write_off")
@Data
public class ReceiptWriteOff implements Serializable {
    @TableId(type = IdType.AUTO)
    private Long id;

    //核销单号
    @TableField("write_off_no")
    private String writeOffNo;

    private Long customerId;

    //收款单ID
    private Integer receiptOrderId;

    // 应收明细ID（可选）
    private Long receivableDetailId;

    // 本次核销金额
    private BigDecimal amount;


    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date writeOffDate;

    // 财务人员
    @TableField("u_id")
    private Integer uId;

    // 备注
    private String remark;

    // 创建时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}
